Balance Inquiry

Request to retrieve the balance available to spend on a card. You can use this operation to request: The balance available on a gift card, or The balance available to spend by redeeming rewards earned using a card enrolled in a rewards program. For gift cards, only the balance available is returned. For credit or debit cards, additional details such as the reward points available to redeem and the conversion rate used to determine the available balance are also returned.

PUT https://gateway-japa.americanexpress.com/api/rest/version/59 / merchant / {merchantId} / balanceInquiry

Authentication Copied to clipboard

This operation requires authentication via one of the following methods:


  • Certificate authentication.
  • Basic HTTP authentication as described at w3.org. Provide 'merchant.<your gateway merchant ID>' in the userid portion and your API password in the password portion.

Request Copied to clipboard

URL Parameters Copied to clipboard

{merchantId} Copied to clipboard Alphanumeric + additional characters REQUIRED

The unique identifier issued to you by your payment provider.


This identifier can be up to 12 characters in length.


Data may consist of the characters 0-9, a-z, A-Z, '-', '_'

Min length: 1 Max length: 40

Fields Copied to clipboard

correlationId Copied to clipboard String OPTIONAL

A transient identifier for the request, that can be used to match the response to the request.

The value provided is not validated, does not persist in the gateway, and is returned as provided in the response to the request.

Data can consist of any characters

Min length: 1 Max length: 100
order.currency Copied to clipboard Upper case alphabetic text REQUIRED

The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
order.subMerchant Copied to clipboard OPTIONAL

Provide these parameters if you are a payment aggregator or facilitator and process payments on behalf of other merchants.

These merchants are referred to as your sub-merchants. The sub-merchant's details you provide may be displayed on the payer's cardholder statement. Note that your acquirer may require you to register with the card scheme(s) before allowing you to submit sub-merchant details with a transaction. This data must be on the initial transaction of an order, subsequent transactions with sub-merchant will be rejected.

order.subMerchant.address Copied to clipboard OPTIONAL

The sub-merchant's address.

order.subMerchant.address.city Copied to clipboard String OPTIONAL

The city portion of the address.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.address.company Copied to clipboard String OPTIONAL

The name of the company associated with this address.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.address.country Copied to clipboard Upper case alphabetic text OPTIONAL

The 3 letter ISO standard alpha country code of the address.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
order.subMerchant.address.postcodeZip Copied to clipboard Alphanumeric + additional characters OPTIONAL

The post code or zip code of the address.

Data may consist of the characters 0-9, a-z, A-Z, ' ', '-'

Min length: 1 Max length: 10
order.subMerchant.address.stateProvince Copied to clipboard String OPTIONAL

The state or province of the address.

Data can consist of any characters

Min length: 1 Max length: 20
order.subMerchant.address.stateProvinceCode Copied to clipboard String OPTIONAL

The three character ISO 3166-2 country subdivision code for the state or province of the address.

Providing this field might improve your payer experience for 3-D Secure payer authentication.

Data can consist of any characters

Min length: 1 Max length: 3
order.subMerchant.address.street Copied to clipboard String OPTIONAL

The first line of the address.

For example, this may be the street name and number, or the Post Office Box details.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.address.street2 Copied to clipboard String OPTIONAL

The second line of the address (if provided).

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.bankIndustryCode Copied to clipboard Digits OPTIONAL

Code used by acquirer to describe the business or industry the sub-merchant operates in.

Data is a string that consists of the characters 0-9.

Min length: 4 Max length: 4
order.subMerchant.email Copied to clipboard Email OPTIONAL

The sub-merchant's email address.

Ensures that the email address is longer than 3 characters and adheres to a generous subset of valid RFC 2822 email addresses

order.subMerchant.identifier Copied to clipboard String REQUIRED

Your identifier for the sub-merchant.

You can use this identifier in searches and reports in the gateway.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.phone Copied to clipboard String OPTIONAL

The sub-merchant's phone number

Data can consist of any characters

Min length: 1 Max length: 20
order.subMerchant.registeredName Copied to clipboard String OPTIONAL

The legal name of the sub-merchant.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.tradingName Copied to clipboard String REQUIRED

The trading name of the sub merchant, also known as doing business as (DBA), operating as or trading as.

For MasterCard transactions the name must not exceed 21 characters. For American Express transactions the name must not exceed 27 characters (or 36 characters including the aggregator name). The trading name may be displayed on the payer's cardholder statement. Therefore if you need to shorten it, use an abbreviation that will be meaningful to the payer when displayed on their statement.

Data can consist of any characters

Min length: 1 Max length: 100
responseControls Copied to clipboard OPTIONAL

Container for fields that control the response returned for the request.

responseControls.sensitiveData Copied to clipboard String OPTIONAL

Indicates how sensitive data is returned in the response.

Data can consist of any characters

Min length: 1 Max length: 50
session.id Copied to clipboard ASCII Text OPTIONAL

Identifier of the payment session containing values for any of the request fields to be used in this operation.

Values provided in the request will override values contained in the session.

Data consists of ASCII characters

Min length: 31 Max length: 35
session.version Copied to clipboard ASCII Text OPTIONAL

Use this field to implement optimistic locking of the session content.

Do this if you make business decisions based on data from the session and wish to ensure that the same data is being used for the request operation.

To use optimistic locking, record session.version when you make your decisions, and then pass that value in session.version when you submit your request operation to the gateway.

If session.version provided by you does not match that stored against the session, the gateway will reject the operation with error.cause=INVALID_REQUEST.

See Making Business Decisions Based on Session Content.

Data consists of ASCII characters

Min length: 10 Max length: 10
sourceOfFunds Copied to clipboard REQUIRED

Information about the payment type selected by the payer for this payment and the source of the funds.

Depending on the payment type the source of the funds can be a debit or credit card, bank account, or account with a browser payment provider (such as PayPal).

For card payments the source of funds information may be represented by combining one or more of the following: explicitly provided card details, a session identifier which the gateway will use to look up the card details and/or a card token. Precedence rules will be applied in that explicitly provided card details will override session card details which will override card token details. Each of these may represent partial card details, however the combination must result in a full and complete set of card details. See Using Multiple Sources of Card Details for examples.

sourceOfFunds.provided Copied to clipboard OPTIONAL

Information about the source of funds when it is directly provided (as opposed to via a token or session).

For browser payments, the source of funds details are usually collected from the payer on the payment provider's website and provided to you when you retrieve the transaction details (for a successful transaction). However, for some payment types (such as giropay), you must collect the information from the payer and supply it here.

sourceOfFunds.provided.card Copied to clipboard OPTIONAL

Contains card details

sourceOfFunds.provided.card.accountType Copied to clipboard Enumeration OPTIONAL

Type of the bank account associated with the card.

Provide this information for Maestro cards.

Value must be a member of the following list. The values are case sensitive.

CHECKING
SAVINGS
sourceOfFunds.provided.card.emvRequest Copied to clipboard String OPTIONAL

This field only applies to transactions that originate from an EMV capable terminal.

It contains selected EMV fields as provided by the terminal.

For the list of field tags to include (if provided by the terminal), see Card Present Payments. Requests with any other tags are rejected by the gateway.

Some of the tags represent data that can occur on explicit fields in this API. You can submit the value either in this field, or in both places. For example, the PAN can be presented as EMV tag 5A in this field, or included both the sourceOfFunds.provided.card.number API field and in EMV tag 5A in this field.

If you specify the EMV tag only, we can populate the explicit field in the API. Fields where this is supported have the text "This field corresponds to EMV tag <tag name>" in their field descriptions.

If you specify both places, there will be no population of the explicit field or validation that the data matches.

The API response will not contain PCI sensitive fields.

Data can consist of any characters

Min length: 1 Max length: 250
sourceOfFunds.provided.card.expiry Copied to clipboard OPTIONAL

Expiry date, as shown on the card.

This field corresponds to EMV tag 5F24

sourceOfFunds.provided.card.expiry.month Copied to clipboard Digits REQUIRED

Month, as shown on the card.

Months are numbered January=1, through to December=12.

Data is a number between 1 and 12 represented as a string.

sourceOfFunds.provided.card.expiry.year Copied to clipboard Digits REQUIRED

Year, as shown on the card.

The Common Era year is 2000 plus this value.

Data is a string that consists of the characters 0-9.

Min length: 2 Max length: 2
sourceOfFunds.provided.card.maskedFpan Copied to clipboard Masked digits OPTIONAL

The Funding Primary Account Number (FPAN) of the payer's account in 6.4 masking format, for example, 000000xxxxxx0000.

You should use this value for display on confirmation or receipt pages presented to the payer.

RequestNormally you do not need to populate this field, as the gateway will populate this field in the session, and populate it into the payment request when you submit the payment using the session. You would only provide this value, if you had access to FPAN information that was not available to the gateway. On responses, the gateway populates it with a form that the payer would recognize (also explained in more detail below).

Retrieve session response

The gateway always populates this field with its best understanding of the masked FPAN.If you are showing PAN data from the session to the payer, then use this field rather than sourceOfFunds.provided.card.number from the session. This is because this field contains a PAN that the payer will recognize whereas sourceOfFunds.provided.card.number could contain a scheme token, or device PAN which the payer will not recognize. After the payment is processed, the gateway will populate the sourceOfFunds.provided.card.number in the payment response with its best understanding of the masked FPAN. You can show this value to the payer after the payment is complete. This logic also applies to the maskedFpanExpiry field.

Data is a string that consists of the characters 0-9, plus 'x' for masking

Min length: 9 Max length: 19
sourceOfFunds.provided.card.maskedFpanExpiry Copied to clipboard OPTIONAL

Expiry date, The expiry date of the Funding Primary Account Number (FPAN) in sourceOfFunds.provided.card.maskedFpan.

sourceOfFunds.provided.card.maskedFpanExpiry.month Copied to clipboard Digits OPTIONAL

The expiration month for the Funding Primary Account Number (FPAN).

Months are numbered January=1, through to December=12.

Data is a number between 1 and 12 represented as a string.

sourceOfFunds.provided.card.maskedFpanExpiry.year Copied to clipboard Digits OPTIONAL

The expiration year for the Funding Primary Account Number (FPAN).

The Common Era year is 2000 plus this value.

Data is a string that consists of the characters 0-9.

Min length: 2 Max length: 2
sourceOfFunds.provided.card.mobileWallet Copied to clipboard OPTIONAL

If the payer chose to pay using a mobile device you must provide details from the wallet in this parameter group.

Use this parameter group when accepting payments from mobile wallet providers such as Apple Pay, Android Pay or Samsung Pay.

sourceOfFunds.provided.card.mobileWallet.3DSecure Copied to clipboard OPTIONAL

Cryptogram data for mobile wallet payments provided in 3DSecure format.

sourceOfFunds.provided.card.mobileWallet.3DSecure.eciIndicator Copied to clipboard Digits OPTIONAL

The Electronic Commerce Indicator generated for the mobile wallet payment.

It indicates the level of security and authentication of the transaction.

Data is a string that consists of the characters 0-9.

Min length: 1 Max length: 2
sourceOfFunds.provided.card.mobileWallet.3DSecure.onlinePaymentCryptogram Copied to clipboard Base64 REQUIRED

The unique transaction cryptogram generated for the mobile wallet payment.

This will be in Base64 format for MasterCard and Visa transactions and binary format for American Express transactions.

Data is Base64 encoded

Min length: 1 Max length: 128
sourceOfFunds.provided.card.mobileWallet.cryptogramFormat Copied to clipboard Enumeration REQUIRED

The format of the cryptogram provided for the device payment.

You must provide the cryptogram format when you decrypt the payment token and provide the payment details (including the online payment cryptogram) in the transaction request.

Value must be a member of the following list. The values are case sensitive.

3DSECURE

The payment data keys for the online payment cryptogram are provided using the 3-D Secure format.

EMV

The payment data keys for the online payment cryptogram are provided using the EMV format.

sourceOfFunds.provided.card.nameOnCard Copied to clipboard String OPTIONAL

The cardholder's name as printed on the card.

Data can consist of any characters

Min length: 1 Max length: 256
sourceOfFunds.provided.card.number Copied to clipboard Digits OPTIONAL

The account number of the payer's account used for the payment.

On requests, provide the number in the form that you receive it (as explained below). On responses, the gateway populates it with a form that the payer would recognize (also explained in more detail below).

  • Request

    On request, populate this field based on the payment method you are using for the payment:
    • • Card: the account number embossed onto the card. This field corresponds to EMV tag 5A.
    • • Device payment methods such as Apple Pay, Android Pay, Samsung Pay, or Google Pay. Normally for device payments, you would populate sourceOfFunds.provided.card.devicePayment.paymentToken and the gateway will decrypt and extract this field. However, you can populate this field if you decrypt the payment token yourself. In this case use the Device PAN (DPAN) provided in the payment token.
    • • Digital wallets such as Masterpass, Visa Checkout or Amex Express Checkout. In this case, provide the PAN retrieved from the wallet.
    • • Scheme tokens such as MDES (Mastercard Digital Enablement Service). Supply the value called the "Token PAN".
  • Response

    On return, the card number will be populated in 6.4 masking format, for example, 000000xxxxxx0000. If you wish to return unmasked card numbers, you must have the requisite permission, set responseControls.sensitiveData field to UNMASK, and authenticate your call to the API using certificate authentication.

    When a DPAN or scheme token was provided in the transaction request, then this field will represent the PAN of the associated payer's account (when supported by the acquirer). This is also referred to as the Funding PAN (FPAN).

Data is a string that consists of the characters 0-9.

Min length: 9 Max length: 19
sourceOfFunds.provided.card.p2pe Copied to clipboard OPTIONAL

This holds the PAN in the case where it is encrypted by the terminal using DUKPT key exchange.

sourceOfFunds.provided.card.p2pe.cardBin Copied to clipboard Digits OPTIONAL

The BIN of the card.

If you provide this, the gateway will check that the decrypted PAN has these leading six digits. If the check fails, the gateway will reject the transaction.

If you do not provided this, the gateway will not perform this check.

Data is a string that consists of the characters 0-9.

Min length: 1 Max length: 6
sourceOfFunds.provided.card.p2pe.encryptionState Copied to clipboard String OPTIONAL

The P2PE encryption state as determined by the terminal.

INVALID means the terminal detected some form of error in the encryption process. The gateway will decline transactions with INVALID encryption state. This field may be omitted when the value is VALID.

Data can consist of any characters

Min length: 5 Max length: 7
sourceOfFunds.provided.card.p2pe.initializationVector Copied to clipboard Hex OPTIONAL

The initialization vector supplied by the terminal to seed the encryption of this payload.

Omit this value if the terminal is not using an initialization vector to seed encryption.

Data is hexadecimal encoded

Min length: 16 Max length: 16
sourceOfFunds.provided.card.p2pe.keySerialNumber Copied to clipboard Hex REQUIRED

The DUKPT key serial number supplied by the terminal.

Data is hexadecimal encoded

Min length: 20 Max length: 20
sourceOfFunds.provided.card.p2pe.payload Copied to clipboard Hex REQUIRED

The DUKPT encrypted payload supplied by the terminal.

Data is hexadecimal encoded

Min length: 32 Max length: 1024
sourceOfFunds.provided.card.pin Copied to clipboard OPTIONAL

The PIN (Personal Identification Number) entered by a payer at the point of sale that is used to authenticate their identity as the cardholder with the issuer.

Provide this data in the case were you want the PIN verified online by the issuer. The gateway supports PINs encoded in ISO 9564-1 formats 0, 1 and 3.

sourceOfFunds.provided.card.pin.encryptionState Copied to clipboard Enumeration OPTIONAL

The PIN encryption state as determined by the terminal.

INVALID means the terminal detected some form of error in the encryption process. The gateway will decline transactions with INVALID encryption state. This field may be omitted when the value is VALID.

Value must be a member of the following list. The values are case sensitive.

INVALID

The encryption state is invalid.

VALID

The encryption state is valid.

sourceOfFunds.provided.card.pin.keySerialNumber Copied to clipboard Hex REQUIRED

The DUKPT key serial number supplied by the terminal.

Data is hexadecimal encoded

Min length: 20 Max length: 20
sourceOfFunds.provided.card.pin.payload Copied to clipboard Hex REQUIRED

The DUKPT encrypted payload supplied by the terminal.

Data is hexadecimal encoded

Min length: 16 Max length: 16
sourceOfFunds.provided.card.securityCode Copied to clipboard Digits OPTIONAL

Card verification code, as printed on the back or front of the card or as provided for a card scheme token.

Data is a string that consists of the characters 0-9.

Min length: 3 Max length: 4
sourceOfFunds.provided.card.sequenceNumber Copied to clipboard Digits OPTIONAL

A number used to differentiate between cards with the same Primary Account Number (PAN).

This field corresponds to EMV tag 5F34

Data is a number between 0 and 999 represented as a string.

sourceOfFunds.provided.card.storedOnFile Copied to clipboard Enumeration OPTIONAL

This field only applies if you collect cards from your payers, store them, and either you or your payers use the stored value for subsequent payments.

If you store using gateway tokenization then you can ignore this field, unless you do payments with both stored and non-stored cards. If you do both, then you must supply the NOT_STORED value for the non-stored case.

If you use Scheme Tokenization services like MDES and store the tokens provided, you have to provide the value STORED and if you pass the token value with out storing them, provide the value NOT_STORED.

If you store yourself, you have to provide the TO_BE_STORED or STORED values for all payments.

Value must be a member of the following list. The values are case sensitive.

NOT_STORED

Set this value if the card or token details provided will not be stored. This is the default value for merchants without tokenization.

STORED

Set this value if the card or token details provided have been stored previously. This is the default value when paying with a gateway token.

TO_BE_STORED

Set this value if this is the first transaction using the card and you intend to store the card or token details on success. This is the default value for tokenization merchants who present a payment with a PAN.

sourceOfFunds.provided.card.track1 Copied to clipboard Track 1 Data OPTIONAL

This field contains the full track data.

You may optionally include the start and end sentinels and LRC.

Provide this for stripe and EMV fallback to stripe cases.

This field corresponds to EMV tag 56

Data must comply with ISO 7811-2 track 1 data character set.
Data may consist of the characters: ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ]]>

Min length: 2 Max length: 79
sourceOfFunds.provided.card.track2 Copied to clipboard Track 2 Data OPTIONAL

This field contains the full track data.

You may optionally include the start and end sentinels and LRC.

Provide this for stripe and EMV fallback to stripe cases.

The contents of this field must match the PAN and expiry fields included in the Transaction Request.

This field corresponds to EMV tag 57

Data must comply with ISO 7811-2 track 2 data character set.
Data may consist of the characters: ? ]]>

Min length: 2 Max length: 40
sourceOfFunds.provided.giftCard Copied to clipboard OPTIONAL

Contains gift card details

sourceOfFunds.provided.giftCard.expectedLocalBrand Copied to clipboard String OPTIONAL

Do not provide this field in your request unless instructed to do so by your payment service provider.

The field is required, if your gift card numbers do not use ISO BIN rules and therefore not allowing the gateway to identify the local brand.

Data can consist of any characters

Min length: 4 Max length: 50
sourceOfFunds.provided.giftCard.number Copied to clipboard Digits OPTIONAL

Card number as printed or embossed on the gift card.

Data is a string that consists of the characters 0-9.

Min length: 9 Max length: 19
sourceOfFunds.provided.giftCard.pin Copied to clipboard Digits OPTIONAL

PIN number for the gift card.

Data is a string that consists of the characters 0-9.

Min length: 4 Max length: 8
sourceOfFunds.token Copied to clipboard Alphanumeric OPTIONAL

Uniquely identifies a card and associated details.

Data may consist of the characters 0-9, a-z, A-Z

Min length: 1 Max length: 40
sourceOfFunds.type Copied to clipboard Enumeration REQUIRED

The payment method used for this payment.

If you are passing card data (in any form) on the API, then you need to set this value, and also provide the card details in the sourceOfFunds.provided.card group. In the case of digital wallets or device payment methods, you must also populate the order.walletProvider field.

If you are making a payment with a gateway token, then you can leave this field unset, and only populate the sourceOfFunds.token field. However you can set this to CARD if you want to overwrite or augment the token data with a card security code, expiry date, or cardholder name.

Value must be a member of the following list. The values are case sensitive.

CARD

Use this value for payments that obtained the card details either directly from the card, or from a POS terminal, or from a wallet, or through a device payment method.

GIFT_CARD

Use this value for gift cards.


Response Copied to clipboard

Fields Copied to clipboard

availableBalance Copied to clipboard ALWAYS PROVIDED

Information about the rewards currently available to redeem for the card.

availableBalance.funds.amount Copied to clipboard Decimal CONDITIONAL

The amount available to spend on a gift card.

Data is a decimal number.

Max value: 1000000000000 Min value: 0 Max post-decimal digits: 3
availableBalance.funds.currency Copied to clipboard Upper case alphabetic text CONDITIONAL

The currency of available balance on the gift card expressed as an ISO 4217 alpha code, e.g. USD.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
availableBalance.reward Copied to clipboard CONDITIONAL
availableBalance.reward.amount Copied to clipboard Decimal CONDITIONAL

The amount available to spend by redeeming rewards available for the card.

This amount is the rewards points available for the card (availableBalance.reward.points) divided by the conversion rate (availableBalance.reward.conversionRate). For example, if the payer has 1500 points available and the conversion rate is 10 then the currency equivalent amount is 150.

Data is a decimal number.

Max value: 1000000000 Min value: 0 Max post-decimal digits: 3
availableBalance.reward.conversionRate Copied to clipboard Decimal CONDITIONAL

The factor used to convert rewards points (availableBalance.reward.points) to an amount available to spend (availableBalance.reward.amount).

For example, if the payer has 1500 points available and the conversion rate is 10 then the currency equivalent amount is 150.

Data is a decimal number.

Max value: 1000000000 Min value: 0 Max post-decimal digits: 3
availableBalance.reward.currency Copied to clipboard Upper case alphabetic text CONDITIONAL

The currency of the reward amount (availableBalance.reward.amount).

Expressed as an ISO 4217 alpha code, e.g. USD.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
availableBalance.reward.incrementalSpendAmount Copied to clipboard Decimal CONDITIONAL

The rewards program allows the payer to redeem points for purchases that are above the minimum spend amount (availableBalance.reward.minimumSpendAmount) and below the maximum spend amount (availableBalance.reward.maximumSpendAmount) in multiples of a specific additional amount.

This additional amount is the incremental spend amount. For example, if the minimum spend amount is $100, the maximum spend amount is $500, and the incremental spend amount is $20, then the payer can redeem points for purchases between $100 and $500 in increments of $20. If the purchase is for $155 they can redeem $140 from rewards points and will need to pay the balance of $15 on their card.

Data is a decimal number.

Max value: 1000000000 Min value: 0 Max post-decimal digits: 3
availableBalance.reward.maximumSpendAmount Copied to clipboard Decimal CONDITIONAL

The maximum amount the payer can spend to redeem points for a purchase.

Data is a decimal number.

Max value: 1000000000 Min value: 0 Max post-decimal digits: 3
availableBalance.reward.minimumSpendAmount Copied to clipboard Decimal CONDITIONAL

The minimum rewards amount the payer must spend to redeem points for a purchase.

Data is a decimal number.

Max value: 1000000000 Min value: 0 Max post-decimal digits: 3
availableBalance.reward.payerNominatedAmount Copied to clipboard Boolean CONDITIONAL

Indicates if the rewards program for this card expects the payer to specify the amount to be redeemed during a payment.

If the value is 'true' then you must provide the amount to be redeemed in order.reward.amount when you submit an Authorize or Pay operation, if 'false', then you may not.

JSON boolean values 'true' or 'false'.

availableBalance.reward.points Copied to clipboard Decimal CONDITIONAL

The rewards value (points) currently available to redeem using the card.

Data is a decimal number.

Max value: 1000000000 Min value: 0 Max post-decimal digits: 3
availableBalance.reward.program Copied to clipboard Enumeration CONDITIONAL

The rewards program the card is eligible for or enrolled in.

Value must be a member of the following list. The values are case sensitive.

AMERICAN_EXPRESS_MEMBERSHIP_REWARDS

American Express Membership Rewards.

BANCOMER_MEMBERSHIP_REWARDS

Bancomer Membership Rewards.

balanceId Copied to clipboard Alphanumeric + additional characters CONDITIONAL

An identifier generated by the gateway when you have requested the balance available for a credit or debit card.

It is only returned when a card is eligible for rewards redemption. When redeeming rewards, include this value in the order.reward.balanceId field in the AUTHORIZE or PAY request.

Data may consist of the characters 0-9, a-z, A-Z, '-', '_', ' ', '&', '+', '!', '$', '%', '.'

Min length: 1 Max length: 100
correlationId Copied to clipboard String CONDITIONAL

A transient identifier for the request, that can be used to match the response to the request.

The value provided is not validated, does not persist in the gateway, and is returned as provided in the response to the request.

Data can consist of any characters

Min length: 1 Max length: 100
merchant Copied to clipboard Alphanumeric + additional characters ALWAYS PROVIDED

Your identifier issued to you by your provider.

Data may consist of the characters 0-9, a-z, A-Z, '-', '_'

Min length: 1 Max length: 40
order.currency Copied to clipboard Upper case alphabetic text ALWAYS PROVIDED

The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
order.subMerchant Copied to clipboard CONDITIONAL

Provide these parameters if you are a payment aggregator or facilitator and process payments on behalf of other merchants.

These merchants are referred to as your sub-merchants. The sub-merchant's details you provide may be displayed on the payer's cardholder statement. Note that your acquirer may require you to register with the card scheme(s) before allowing you to submit sub-merchant details with a transaction. This data must be on the initial transaction of an order, subsequent transactions with sub-merchant will be rejected.

order.subMerchant.address Copied to clipboard CONDITIONAL

The sub-merchant's address.

order.subMerchant.address.city Copied to clipboard String CONDITIONAL

The city portion of the address.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.address.company Copied to clipboard String CONDITIONAL

The name of the company associated with this address.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.address.country Copied to clipboard Upper case alphabetic text CONDITIONAL

The 3 letter ISO standard alpha country code of the address.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
order.subMerchant.address.postcodeZip Copied to clipboard Alphanumeric + additional characters CONDITIONAL

The post code or zip code of the address.

Data may consist of the characters 0-9, a-z, A-Z, ' ', '-'

Min length: 1 Max length: 10
order.subMerchant.address.stateProvince Copied to clipboard String CONDITIONAL

The state or province of the address.

Data can consist of any characters

Min length: 1 Max length: 20
order.subMerchant.address.street Copied to clipboard String CONDITIONAL

The first line of the address.

For example, this may be the street name and number, or the Post Office Box details.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.address.street2 Copied to clipboard String CONDITIONAL

The second line of the address (if provided).

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.bankIndustryCode Copied to clipboard Digits CONDITIONAL

Code used by acquirer to describe the business or industry the sub-merchant operates in.

Data is a string that consists of the characters 0-9.

Min length: 4 Max length: 4
order.subMerchant.email Copied to clipboard Email CONDITIONAL

The sub-merchant's email address.

Ensures that the email address is longer than 3 characters and adheres to a generous subset of valid RFC 2822 email addresses

order.subMerchant.identifier Copied to clipboard String CONDITIONAL

Your identifier for the sub-merchant.

You can use this identifier in searches and reports in the gateway.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.phone Copied to clipboard String CONDITIONAL

The sub-merchant's phone number

Data can consist of any characters

Min length: 1 Max length: 20
order.subMerchant.registeredName Copied to clipboard String CONDITIONAL

The legal name of the sub-merchant.

Data can consist of any characters

Min length: 1 Max length: 100
order.subMerchant.tradingName Copied to clipboard String CONDITIONAL

The trading name of the sub merchant, also known as doing business as (DBA), operating as or trading as.

For MasterCard transactions the name must not exceed 21 characters. For American Express transactions the name must not exceed 27 characters (or 36 characters including the aggregator name). The trading name may be displayed on the payer's cardholder statement. Therefore if you need to shorten it, use an abbreviation that will be meaningful to the payer when displayed on their statement.

Data can consist of any characters

Min length: 1 Max length: 100
response Copied to clipboard ALWAYS PROVIDED

Value as generated by the acquirer that summarizes the success or otherwise of the proposed operation.

response.acquirerCode Copied to clipboard ASCII Text CONDITIONAL

Value as generated by the acquirer that summarizes the success or otherwise of the proposed operation.

Data consists of ASCII characters

Min length: 1 Max length: 100
response.acquirerMessage Copied to clipboard ASCII Text CONDITIONAL

The response from the acquirer in the text form.

This field is used in addition to response.acquirerCode for some acquirers where additional information needs to be communicated. For example, contact details to allow the merchant to contact the issuer directly to seek authorisation for the transaction.

Data consists of ASCII characters

Min length: 1 Max length: 255
response.gatewayCode Copied to clipboard Enumeration ALWAYS PROVIDED

Summary of the success or otherwise of the operation.

Value must be a member of the following list. The values are case sensitive.

BALANCE_AVAILABLE

A balance amount is available for the card, and the payer can redeem points.

BALANCE_UNKNOWN

A balance amount might be available for the card. Points redemption should be offered to the payer.

NO_BALANCE

A balance amount is not available for the card. The payer cannot redeem points.

TIMED_OUT

The gateway has timed out the request to the acquirer because it did not receive a response. Points redemption should not be offered to the payer.

result Copied to clipboard Enumeration ALWAYS PROVIDED

A system-generated high level overall result of the operation.

Value must be a member of the following list. The values are case sensitive.

FAILURE

The operation was declined or rejected by the gateway, acquirer or issuer

PENDING

The operation is currently in progress or pending processing

SUCCESS

The operation was successfully processed

UNKNOWN

The result of the operation is unknown

sourceOfFunds Copied to clipboard ALWAYS PROVIDED
sourceOfFunds.provided Copied to clipboard CONDITIONAL

Information about the source of funds when it is directly provided (as opposed to via a token or session).

For browser payments, the source of funds details are usually collected from the payer on the payment provider's website and provided to you when you retrieve the transaction details (for a successful transaction). However, for some payment types (such as giropay), you must collect the information from the payer and supply it here.

sourceOfFunds.provided.giftCard Copied to clipboard CONDITIONAL

Contains gift card details

sourceOfFunds.provided.giftCard.brand Copied to clipboard Enumeration ALWAYS PROVIDED

The brand name used to describe the card that is recognized and accepted globally.

For many major card types this will match the scheme name.

Value must be a member of the following list. The values are case sensitive.

LOCAL_BRAND_ONLY

The card does not have a global brand.

sourceOfFunds.provided.giftCard.localBrand Copied to clipboard String ALWAYS PROVIDED

The brand name used to describe a card as determined by the gateway, based on the BIN range of the card.

Data can consist of any characters

Min length: 1 Max length: 50
sourceOfFunds.provided.giftCard.number Copied to clipboard Masked digits ALWAYS PROVIDED

Card number as printed or embossed on the gift card.

Data is a string that consists of the characters 0-9, plus 'x' for masking

Min length: 9 Max length: 19
sourceOfFunds.provided.giftCard.pin Copied to clipboard Masked digits CONDITIONAL

PIN number for the gift card.

Data is a string that consists of the characters 0-9, plus 'x' for masking

Min length: 4 Max length: 8
sourceOfFunds.provided.giftCard.scheme Copied to clipboard Enumeration ALWAYS PROVIDED

The organization that owns a card brand and defines operating regulations for its use.

Value must be a member of the following list. The values are case sensitive.

OTHER

The scheme of the card used in the transaction could not be identified.

sourceOfFunds.token Copied to clipboard Alphanumeric CONDITIONAL

Uniquely identifies a card and associated details.

Data may consist of the characters 0-9, a-z, A-Z

Min length: 1 Max length: 40
sourceOfFunds.type Copied to clipboard Enumeration CONDITIONAL

The payment method your payer has chosen for this payment.

Value must be a member of the following list. The values are case sensitive.

CARD

Use this value for payments that obtained the card details either directly from the card, or from a POS terminal, or from a wallet, or through a device payment method.

GIFT_CARD

Use this value for gift cards.

Errors Copied to clipboard

error Copied to clipboard

Information on possible error conditions that may occur while processing an operation using the API.

error.cause Copied to clipboard Enumeration

Broadly categorizes the cause of the error.

For example, errors may occur due to invalid requests or internal system failures.

Value must be a member of the following list. The values are case sensitive.

INVALID_REQUEST

The request was rejected because it did not conform to the API protocol.

REQUEST_REJECTED

The request was rejected due to security reasons such as firewall rules, expired certificate, etc.

SERVER_BUSY

The server did not have enough resources to process the request at the moment.

SERVER_FAILED

There was an internal system failure.

error.explanation Copied to clipboard String

Textual description of the error based on the cause.

This field is returned only if the cause is INVALID_REQUEST or SERVER_BUSY.

Data can consist of any characters

Min length: 1 Max length: 1000
error.field Copied to clipboard String

Indicates the name of the field that failed validation.

This field is returned only if the cause is INVALID_REQUEST and a field level validation error was encountered.

Data can consist of any characters

Min length: 1 Max length: 100
error.supportCode Copied to clipboard String

Indicates the code that helps the support team to quickly identify the exact cause of the error.

This field is returned only if the cause is SERVER_FAILED or REQUEST_REJECTED.

Data can consist of any characters

Min length: 1 Max length: 100
error.validationType Copied to clipboard Enumeration

Indicates the type of field validation error.

This field is returned only if the cause is INVALID_REQUEST and a field level validation error was encountered.

Value must be a member of the following list. The values are case sensitive.

INVALID

The request contained a field with a value that did not pass validation.

MISSING

The request was missing a mandatory field.

UNSUPPORTED

The request contained a field that is unsupported.

result Copied to clipboard Enumeration

A system-generated high level overall result of the operation.

Value must be a member of the following list. The values are case sensitive.

ERROR

The operation resulted in an error and hence cannot be processed.